﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace FileManager
{
    public static class FileMgr
    {
        public static bool CreateFile(string inFileName, string inContent)
        {
            try
            {
                FileStream fs = new FileStream(inFileName, FileMode.OpenOrCreate);
                StreamWriter sw = new StreamWriter(fs);
                sw.Write(inContent);
                sw.Close();
                fs.Close();
                return true;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return false;
            }
        }

        public static bool DeleteFile(string inFileName)
        {
            try
            {
                File.Delete(inFileName);
                return true;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return false;
            }
        }

    }
}
